From 129c717a719474815d5b92d2fcf5b3e75ba2aaf2 Mon Sep 17 00:00:00 2001 From: Li Yuan Date: Mon, 31 Mar 2008 07:48:16 +0000 Subject: [PATCH] Bug #433324. add/remove selectable state depand on if the button can be 2008-03-31 Li Yuan * gailbutton.c: (gail_button_ref_state_set): Bug #433324. add/remove selectable state depand on if the button can be focused. svn path=/trunk/; revision=19950 --- modules/other/gail/ChangeLog | 6 ++++++ modules/other/gail/gailbutton.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/other/gail/ChangeLog b/modules/other/gail/ChangeLog index 798a67d2db..8f3dcd529f 100644 --- a/modules/other/gail/ChangeLog +++ b/modules/other/gail/ChangeLog @@ -1,3 +1,9 @@ +2008-03-31 Li Yuan + + * gailbutton.c: (gail_button_ref_state_set): + Bug #433324. add/remove selectable state depand on if the button can + be focused. + 2008-03-20 Li Yuan * gailcell.c: (gail_cell_object_finalize): diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c index c2b8e8c700..64232f5e93 100644 --- a/modules/other/gail/gailbutton.c +++ b/modules/other/gail/gailbutton.c @@ -861,6 +861,12 @@ gail_button_ref_state_set (AtkObject *obj) if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE) atk_state_set_add_state (state_set, ATK_STATE_ARMED); + if (GTK_WIDGET_CAN_FOCUS(widget)) + atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE); + else + atk_state_set_remove_state (state_set, ATK_STATE_SELECTABLE); + + return state_set; } -- 2.30.2